<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no"/>
<xsl:template match="/dataroot">#!/bin/bash
case "$1" in
*fix*.*log*)
sed -e '<xsl:apply-templates select="Fields"/>' "$1"
;;
*)
# We dont handle this format. 
exit 1
esac
# No further processing by lesspipe necessary
exit 0
</xsl:template>

<xsl:template match="Fields">s/'$'\cA''<xsl:value-of select="Tag"/>=/|<xsl:value-of select="FieldName"/>=/g
</xsl:template>
</xsl:stylesheet>
